<%@ page language="java" pageEncoding="utf-8"%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>
<head>
<title>稿件列表</title>
<script type="text/javascript">
$(document).ready(function(){

});

function checkDelet(id){
	if(BaseJs.confirm('确定要删除吗？')){
		//alert(id);
		$.urlAjax('manuscript/EditManuscript!delete?manuscript.id='+id,function(){
			$('#pt' + id).remove();
		});
	}
}
</script>
</head>
<body>
<h2 class="title">稿件列表<m:imgA img="add" msg="撰写稿件" action="manuscript/EditManuscript!toEdit" /></h2>
<table class="list">
	<thead>
		<tr>
			<th width="30%">标题</th>
			<th width="20%">撰稿人</th>
			<th width="10%">稿件状态</th>
			<th width="10%">撰稿栏目</th>
			<th width="20%">撰稿日期</th>
			<th width="15%">操作</th>
		</tr>
	</thead>
	<tbody>
		<s:iterator value="manuscripts.items">
			<tr id="pt${id}">
				<td><s:property value="title" /></td>
				<td><s:property value="user.name" /></td>
				<td><s:if test="auditZt==0">草稿</s:if> <s:elseif test="auditZt==1">一审中</s:elseif> <s:elseif test="auditZt==2">二审中</s:elseif>
				<s:elseif test="auditZt==3">三审中</s:elseif> <s:elseif test="auditZt==4">审核完毕</s:elseif> <s:elseif
					test="auditZt==-100">毙稿</s:elseif> <s:else>错误</s:else></td>
				<td><m:property value="column" /></td>
				<td><s:date name="createDate" format="yyyy-MM-dd" /></td>
				<td class="opera" id="${id}"><s:if test="auditZt==0">
					<m:imgA img="edit" msg="编辑" action="manuscript/EditManuscript!toEdit?manuscript.id=${id}" />
					<m:imgA img="delete" msg="删除" onclick="javascript:checkDelet(${id});" />
				</s:if> <s:elseif test="auditZt==1">
					<m:permiss permiss="MS_ADUIT_ONE">
						<m:imgA img="edit" msg="审核" action="manuscript/EditManuscript!toAudit?manuscript.id=${id}" />
					</m:permiss>
				</s:elseif> <s:elseif test="auditZt==2">
					<m:permiss permiss="MS_ADUIT_TWO">
						<m:imgA img="edit" msg="审核" action="manuscript/EditManuscript!toAudit?manuscript.id=${id}" />
					</m:permiss>
				</s:elseif> <s:elseif test="auditZt==3">
					<m:permiss permiss="MS_ADUIT_THREE">
						<m:imgA img="edit" msg="审核" action="manuscript/EditManuscript!toAudit?manuscript.id=${id}" />
					</m:permiss>
				</s:elseif> <s:elseif test="auditZt==4">
					<m:imgA img="edit" msg="编辑" action="manuscript/EditManuscript!toEdit?manuscript.id=${id}" />
					<m:permiss permiss="MS_DONE_KILL">
						<m:imgA img="alert" msg="毙稿" action="manuscript/EditManuscript!killMas?manuscript.id=${id}" />
					</m:permiss>
				</s:elseif></td>
			</tr>
		</s:iterator>
	</tbody>
</table>
<m:page value="${manuscripts}" showSeaBar="true" />
</body>